import time
from selenium import webdriver
from selenium.webdriver.common.by import By


class TaobaoUntil:

    def login(slef):
        options = webdriver.ChromeOptions()
        options.add_experimental_option("detach", True)

        driver = webdriver.Chrome(options=options)
        driver.get("https://cdp-elc-uat.elcapp.cn/#/passport-login")

        driver.find_element(By.XPATH,"//input[@id='email']").send_keys("admin")
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys("A@1234cn")

        driver.find_element(By.XPATH, "//div[@id='login']").click()

    def  open_driver(slef,url):
        options = webdriver.ChromeOptions()
        options.add_experimental_option("detach", True)

        driver = webdriver.Chrome(options=options)
        driver.get(url)

        return driver





